<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <!-- 隐藏用户ID字段，不可修改 -->
    <input id="c-user_id2" name="row[user_id]" type="hidden" value="{$row.user_id}">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Course_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-course_id" class="form-control" name="row[course_id]" type="number" value="{$row.course_id}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Course_type')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-course_type" class="form-control selectpicker" name="row[course_type]">
                {foreach name="courseTypeList" item="vo"}
                <option value="{$key}" {if $row.course_type==$key}selected{/if}>{$vo}</option>
                {/foreach}
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Chapter_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-chapter_id" class="form-control" name="row[chapter_id]" type="number" value="{$row.chapter_id}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Chapter_name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-chapter_name" class="form-control" name="row[chapter_name]" type="text" value="{$row.chapter_name}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Learning_duration')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-learning_duration" class="form-control" name="row[learning_duration]" type="number" value="{$row.learning_duration}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Learning_progress')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-learning_progress" class="form-control" name="row[learning_progress]" type="number" step="0.01" value="{$row.learning_progress}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Is_completed')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="radio">
                {foreach name="isCompletedList" item="vo"}
                <label for="row[is_completed]-{$key}"><input id="row[is_completed]-{$key}" name="row[is_completed]" type="radio" value="{$key}" {if $row.is_completed==$key}checked{/if}> {$vo}</label>
                {/foreach}
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Start_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-start_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[start_time]" type="text" value="{$row.start_time}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('End_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-end_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[end_time]" type="text" value="{$row.end_time}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Last_position')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-last_position" class="form-control" name="row[last_position]" type="number" value="{$row.last_position}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Device_type')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-device_type" class="form-control selectpicker" name="row[device_type]">
                {foreach name="deviceTypeList" item="vo"}
                <option value="{$key}" {if $row.device_type==$key}selected{/if}>{$vo}</option>
                {/foreach}
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Ip_address')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-ip_address" class="form-control" name="row[ip_address]" type="text" value="{$row.ip_address}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Score')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-score" class="form-control" name="row[score]" type="number" step="0.01" value="{$row.score}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Notes')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-notes" class="form-control" rows="5" name="row[notes]" cols="50">{$row.notes}</textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8" id="div-status">
            <input id="c-status" name="row[status]" type="hidden" value="{$row.status}">
            <a href="javascript:;" data-toggle="switcher" class="btn-switcher {if $row.status=='1'}active{else}text-gray{/if}" data-input-id="c-status" data-yes="1" data-no="0">
                <i class="fa fa-toggle-on fa-2x {if $row.status!='1'}fa-flip-horizontal{/if}"></i>
            </a>
            <div data-favisible="switch=1" class="p-3">正常</div>
            <div data-favisible="switch=0" class="p-3">禁用</div>
        </div>
    </div>

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>